I guess your question is "what is the java equivalent of c++'s cin".
There is no direct thing.You need to import java.io and see the classes in them and look for the one which is suitable for your purpose(example: DataInputStream Class)
Go through the java documentation for the classes in the package "java.io"